package com.bawei.router.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.bawei.base.path.RoutePath
import com.tencent.mmkv.MMKV

/**
 * Author: Jason Zhang
 * Date: 2025/4/24
 * Desc: 提供服务接口具体实现类
 */

@Route(path = RoutePath.PATH_PROVIDER_SERVICE)
class RouteProviderImpl: IRouteProvider {

    private lateinit var mContext: Context

    override fun init(context: Context?) {
        if (context != null){
            mContext = context
        }
    }

    override fun getLoginToken(): String {
        val token = MMKV.defaultMMKV().decodeString("token")
        return token ?: ""
    }

    override fun getAccessId(): String {
        val accessId = MMKV.defaultMMKV().decodeString("accessId")
        return accessId ?: ""
    }


}